package edu.suda.xsap.controller;

import edu.suda.xsap.common.Result;
import edu.suda.xsap.dto.RegisterDto;
import edu.suda.xsap.entity.Register;
import edu.suda.xsap.service.RegisterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/register")
@Slf4j
public class RegisterController {
    @Autowired
    RegisterService registerService;

    @PostMapping("/save")
    public Result save(@RequestBody Register register) {
        registerService.save(register);
        return Result.success();
    }
}
